form
  - valueIsNull = fieldType.is_nullable && value === null

  p
    - numericTypes = ['bigint', 'integer', 'real', 'smallint', 'double precision', 'numeric', 'decimal']
    if fieldType.data_type == "integer" || numericTypes.includes(fieldType.udt_name) || numericTypes.includes(fieldType.data_type)
      input.number-value(name="value" type="number" value=value disabled=valueIsNull)
    else if fieldType.udt_name == "timestamp" || fieldType.udt_name == "timestamptz" || fieldType.udt_name == "date" || fieldType.udt_name == "timetz"
      input.date-value(name="value" type="text" value=editDateFormat(value, fieldType.udt_name) disabled=valueIsNull)
    else if fieldType.udt_name == "bool"
      select(name="value" disabled=valueIsNull)
        option(value="true"  selected=value) true
        option(value="false" selected=(value === false) ) false
    else
      if ["json", "jsonb"].includes(fieldType.udt_name) || (fieldType.data_type.includes("[]") && Array.isArray(value))
        - value = JSON.stringify(value, null, 2)
      textarea(name="value" placeholder=fieldType.column_default disabled=valueIsNull)= value

  if fieldType.is_nullable
    label
      = "Null"
      input.value-is-null(type="checkbox" name="value_is_null" value="true" checked=valueIsNull )

  p.buttons
    button.ok Update
    button.cancel Cancel
